home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK2.toast / Development Kits (Disc 2) / QuickTime / Sample Code / QuickTime™ codec example / makefile < prev   
Encoding:
Makefile  |  1997-02-26  |  4.2 KB  |  130 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        Makefile
  3. #
  4. #    Contains:    Example Codec Thing Makefile
  5. #
  6. #    Copyright:    © 1991-1996 by Apple Computer, Inc., all rights reserved.
  7.  
  8. ## modify the location of this folder to match your system
  9.  
  10. obj = "{Boot}Objects:"
  11.  
  12. ## 
  13.  
  14. COptions     = -b2 -warnings off -mc68020
  15. AOptions     = -wb
  16. Roptions     = 
  17. UseAsm         = -d NOASM=0
  18. PPCOptions     = -warnings off -appleext on -traceback
  19.  
  20. MWPPCLibs = ∂
  21.     {MWPPCLibraries}InterfaceLib ∂
  22.     {MWPPCLibraries}QuickTimeLib ∂
  23.     {MWPPCLibraries}ComponentsInterfacesLib
  24.  
  25. ExampleFat ƒ {obj}ExampleCodecFat
  26. Example68K ƒ {obj}ExampleCodec68K
  27. ExamplePPC ƒ {obj}ExampleCodecPPC
  28.  
  29. {obj}ExampleCodec68K    ƒ     makefile examplecodec.r {obj}ExampleCodecD.68k {obj}ExampleCodecC.68k ∂
  30.                     {obj}ExampleCodecINIT.rsrc
  31.     Rez {ROptions} -o {targ} ∂
  32.         -c 'appl' -t 'INIT' ∂
  33.         examplecodec.r ∂
  34.         -d DECO_BUILD=1 -d COMP_BUILD=1 -d USE_INIT_STUB=1 ∂
  35.         {UseAsm} ∂
  36.         -d DECO68K=∂"{obj}ExampleCodecD.68k∂" ∂
  37.         -d COMP68K=∂"{obj}ExampleCodecC.68k∂" ∂
  38.         -d INITSTUB=∂"{obj}ExampleCodecINIT.rsrc∂"
  39.  
  40. {obj}ExampleCodecD.68k     ƒ    ∂
  41.                     {obj}ExampleCodecD.c.o ∂
  42.                     {obj}ExampleCodecD.a.o ∂
  43.                     makefile
  44.     Link -w -m CDCOMPONENTDISPATCH -rt 'cdec'=129 -ra 16 ∂
  45.         -sg "Example Compressor" {SYMBOLS}∂
  46.          {obj}ExampleCodecD.c.o ∂
  47.          {obj}ExampleCodecD.a.o ∂
  48.         "{Libraries}"Runtime.o ∂
  49.         "{Libraries}"Interface.o ∂
  50.         -o {targ} -c "RSED" -t "rsrc" 
  51.  
  52. {obj}ExampleCodecC.68k     ƒ    ∂
  53.                     {obj}ExampleCodecC.c.o ∂
  54.                     {obj}ExampleCodecC.a.o ∂
  55.                     makefile
  56.     Link -w -m CDCOMPONENTDISPATCH -rt 'cdec'=128 -ra 16 ∂
  57.         -sg "Example Compressor" {SYMBOLS}∂
  58.          {obj}ExampleCodecC.c.o ∂
  59.          {obj}ExampleCodecC.a.o ∂
  60.         "{Libraries}"Runtime.o ∂
  61.         "{Libraries}"Interface.o ∂
  62.         -o {targ} -c "RSED" -t "rsrc" 
  63.  
  64.  
  65. {obj}ExampleCodecC.c.o ƒ 'Makefile' examplecodec.c
  66.      C {COptions} examplecodec.c {UseAsm} -d COMP_BUILD=1 -d DECO_BUILD=0 -o {targ}
  67.  
  68. {obj}ExampleCodecC.a.o ƒ 'Makefile' examplecodec.a
  69.      Asm {AOptions} examplecodec.a {UseAsm} -d COMP_BUILD=1 -d DECO_BUILD=0 -o {targ}
  70.  
  71. {obj}ExampleCodecD.c.o ƒ 'Makefile' examplecodec.c
  72.      C {COptions} examplecodec.c {UseAsm} -d COMP_BUILD=0 -d DECO_BUILD=1 -o {targ}
  73.  
  74. {obj}ExampleCodecD.a.o ƒ 'Makefile' examplecodec.a
  75.      Asm {AOptions} examplecodec.a {UseAsm} -d COMP_BUILD=0 -d DECO_BUILD=1 -o {targ}
  76.  
  77. ############## Power PC ##################
  78.  
  79. {obj}ExampleCodecFat ƒ makefile examplecodec.r ∂
  80.                     {obj}ExampleCodecC.pef {obj}ExampleCodecD.pef ∂
  81.                     {obj}ExampleCodecD.68k {obj}ExampleCodecC.68k ∂
  82.                     {obj}ExampleCodecINIT.rsrc
  83.     Rez {ROptions} -o {targ} -c 'appl' -t 'INIT' ∂
  84.         examplecodec.r -d POWERPC_NATIVE=1 -d POWERPC_FAT=1 -d POWERPC_QT=1 
  85.         -d DECO_BUILD=1 -d COMP_BUILD=1 -d USE_INIT_STUB=1 {UseAsm} ∂
  86.         -d DECO68K=∂"{obj}ExampleCodecD.68k∂" ∂
  87.         -d COMP68K=∂"{obj}ExampleCodecC.68k∂" ∂
  88.         -d DECOPPC=∂"{obj}ExampleCodecD.pef∂" ∂
  89.         -d COMPPPC=∂"{obj}ExampleCodecC.pef∂" ∂
  90.         -d INITSTUB=∂"{obj}ExampleCodecINIT.rsrc∂"
  91.  
  92.  
  93. {obj}ExampleCodecPPC ƒ makefile examplecodec.r {obj}ExampleCodecC.pef {obj}ExampleCodecD.pef ∂
  94.                     {obj}ExampleCodecINIT.rsrc
  95.     Rez {ROptions} -o {targ} -c 'appl' -t 'INIT' -d DECO_BUILD=1 -d COMP_BUILD=1 -d USE_INIT_STUB=1 ∂
  96.         examplecodec.r -d POWERPC_NATIVE=1 -d POWERPC_QT=1 ∂
  97.         -d DECOPPC=∂"{obj}ExampleCodecD.pef∂" ∂
  98.         -d COMPPPC=∂"{obj}ExampleCodecC.pef∂" ∂
  99.         -d INITSTUB=∂"{obj}ExampleCodecINIT.rsrc∂"
  100.  
  101. {obj}ExampleCodecC.pef ƒ makefile {obj}ExampleCodecC.c.x
  102.     MWLinkPPC -main "CDComponentDispatchRD" -o {targ} {obj}ExampleCodecC.c.x {MWPPCLibs}
  103.  
  104. {obj}ExampleCodecD.pef ƒ makefile {obj}ExampleCodecD.c.x
  105.     MWLinkPPC -main "CDComponentDispatchRD" -o {targ} {obj}ExampleCodecD.c.x {MWPPCLibs}
  106.  
  107. {obj}ExampleCodecC.c.x ƒ makefile examplecodec.c    
  108.     MWCPPC examplecodec.c {PPCOptions} ∂
  109.     -d POWERPC_NATIVE=1 -d NOASM=1 -d COMP_BUILD=1 -d DECO_BUILD=0 ∂
  110.     -o {targ}
  111.  
  112. {obj}ExampleCodecD.c.x ƒ makefile examplecodec.c    
  113.     MWCPPC examplecodec.c {PPCOptions} ∂
  114.     -d POWERPC_NATIVE=1 -d NOASM=1 -d COMP_BUILD=0 -d DECO_BUILD=1 ∂
  115.     -o {targ}
  116.  
  117. ############## Loader stub ##################
  118.  
  119. {obj}ExampleCodecINIT.rsrc ƒ {obj}ExampleCodecINIT.a.o makefile
  120.     Link -w -m MAIN -rt 'INIT'=0 -ra =resLocked ∂
  121.         {SYMBOLS} ∂
  122.          {obj}ExampleCodecINIT.a.o ∂
  123.         "{Libraries}"Runtime.o ∂
  124.         "{Libraries}"Interface.o ∂
  125.         -o {targ} -c "RSED" -t "rsrc" 
  126.  
  127.  
  128. {obj}ExampleCodecINIT.a.o ƒ ExampleCodecINIT.a makefile
  129.     Asm {AOptions} ExampleCodecINIT.a -o {targ}
  130.